package com.tengju.user.domain.model.club;

import com.tengju.user.domain.model.user.ManageUser;
import com.tengju.user.domain.model.user.Staff;
import lombok.Value;
import lombok.experimental.NonFinal;

@Value
public class ClubZoneRelation {

    private ClubId clubId;

    @NonFinal
    private ZoneId zoneId;

    private String createBy;

    @NonFinal
    private String updateBy;

    public boolean isSameZone(ZoneId newZoneId) {
        return this.zoneId.equals(newZoneId);
    }

    public void changeZoneId(ZoneId newZoneId, Staff staff) {
        this.zoneId = newZoneId;
        this.updateBy = staff.getName();
    }
}
